<template>
  <div class="reportFormPage" v-if="show">
    <div class="report-dom">
      <el-row>
        <el-col :span="5" :offset="19">
          <div class="pageNumBox">
            <span>第</span>
            <span class="placeholder-min text-center">&nbsp;{{ form.page }}&nbsp;</span>
            <span>页，共</span>
            <span class="placeholder-min text-center">&nbsp;{{ form.totalPage }}&nbsp;</span>
            <span>页</span>
          </div>
        </el-col>
      </el-row>
      <div class="topTwoBox">
        <div class="centerName">{{ this.form.baobmc }}</div>
        <div class="codeText">
          <tr v-for="(item, index) in form.baobbhList">
            {{
              item
            }}
          </tr>
        </div>
      </div>
      <div class="threeTopBox">
        <div class="left-border">
          <div class="box-title">检测单位名称：</div>
          <div class>{{ form.jiancdwmc }}</div>
        </div>
        <div class="right-border">
          <span>报告编号：</span>
          <span class="placeholder">{{ form.baogbh }}</span>
        </div>
      </div>
      <!-- .........................1111111111111111111111111111111......................................................... -->
      <div class="table-border">
        <table height="220px" class="top-table">
          <tbody>
            <tr>
              <td height="30" align="center" width="15%">
                <span style="width: 90px; display: inline-block">工程名称</span>
              </td>
              <td width="35%" class="text-center">
                <span>{{ form.gongcmc }}</span>
              </td>
              <td align="center" width="15%">
                <span style="width: 90px; display: inline-block">工程部位/用途</span>
              </td>
              <td width="35%" class="text-center">
                <span>{{ form.gongcbwyt }}</span>
              </td>
            </tr>
            <tr>
              <td height="50" align="center">样品信息</td>
              <td class="specimen-border" colspan="3">
                <span>样品名称：</span>
                <span :class="{ placeholder: !form.yangpmc }">{{ form.yangpmc }}</span>
                <span>；样品编号：</span>
                <span :class="{ 'placeholder-long': !form.yangpbh }">{{ form.yangpbh }}</span>
                <span>；样品数量：</span>
                <span :class="{ placeholder: !form.yangpsl }">{{ form.yangpsl }}</span>
                <span>；样品状态：</span>
                <span :class="{ placeholder: !form.yangpzt }">{{ form.yangpzt }}</span>
                <span>；来样时间：</span>
                <span :class="{ placeholder: !form.yangpsj }">{{ form.yangpsj }}</span>
              </td>
            </tr>

            <tr>
              <td height="25" align="center" width="15%">
                <span style="width: 90px; display: inline-block">试验检测日期</span>
              </td>
              <!-- <td width="35%" class="text-center">{{ form.shiyjcrq }}</td> -->
              <td width="35%" class="text-center">
                <el-input v-model="form.shiyjcrq" />
              </td>
              <td align="center" width="15%">
                <span style="width: 90px; display: inline-block">试验条件</span>
              </td>
              <td v-if="isPdf" width="35%">
                温度：
                <span style="display: inline-block; width: 10%">{{ form.shiytjwd }}</span>
                ℃；湿度：
                <span style="display: inline-block; width: 10%">{{ form.shiytjsd }}</span
                >%RH
              </td>
              <td v-else width="35%">
                温度：
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.shiytjwd" style="width: 15%" />℃；湿度：
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.shiytjsd" style="width: 15%" />%RH
              </td>
            </tr>

            <tr>
              <td height="50" align="center" width="15%">
                <span style="width: 90px; display: inline-block">检测依据</span>
              </td>
              <td width="35%">
                <span v-if="isPdf">{{ form.jiancyj }}</span>
                <el-input v-else type="textarea" v-model="form.jiancyj" :rows="2" class="mark" @dblclick.native="showBsJiancyjView" readonly />
              </td>
              <td align="center" width="15%">
                <span style="width: 90px; display: inline-block">判定依据</span>
              </td>
              <td width="35%">
                <span v-if="isPdf">{{ form.pandyj }}</span>
                <el-input v-else type="textarea" v-model="form.pandyj" :rows="2" @dblclick.native="showBsJudgeBaseView" @focus="handleFocus('pandyj')" class="mark" />
              </td>
            </tr>
            <tr class="bottom-border">
              <td height="50" align="center">
                <div>主要仪器设备</div>
                <div>名称及编号</div>
              </td>
              <td colspan="3">
                <span v-if="isPdf">{{ form.zhuyyqsbmcjbh }}</span>
                <el-input v-else type="textarea" :rows="2" v-model="form.zhuyyqsbmcjbh" class="height100 width100 mark" @dblclick.native="showBsInstrumentView" readonly></el-input>
              </td>
            </tr>
          </tbody>
        </table>
        <!-- .................................222222222221111111111111111111111............................................... -->
        <table height="60px" class="middle-table">
          <tbody>
            <tr>
              <td height="30" align="center" width="15%">取样地点</td>
              <td width="35%">
                <span>{{ this.form.quydd }}</span>
              </td>
              <td height="30" align="center" width="15%">代表数量</td>
              <td width="35%">
                <span>{{ this.form.daibsl }}</span>
              </td>
            </tr>
            <tr>
              <td align="center" height="30">进场日期</td>
              <td bgcolor="white">
                <span>{{ this.form.jincrq }}</span>
              </td>
              <td align="center" height="30">产地</td>
              <td bgcolor="white">
                <span>{{ this.form.cd }}</span>
              </td>
            </tr>
          </tbody>
        </table>
        <!-- .................................22222222222222222222222222222222............................................... -->
        <table height="400px" class="middle-table">
          <tbody>
            <tr>
              <td width="15%" colspan="2">材料名称</td>
              <td>{{ form.clmcObj.cailmc1 }}</td>
              <td>{{ form.clmcObj.cailmc2 }}</td>
              <td>{{ form.clmcObj.cailmc3 }}</td>
              <td>{{ form.clmcObj.cailmc4 }}</td>
              <td>{{ form.clmcObj.cailmc5 }}</td>
              <td>{{ form.clmcObj.cailmc6 }}</td>
              <td>{{ form.clmcObj.cailmc7 }}</td>
              <td>{{ form.clmcObj.cailmc8 }}</td>
              <td>{{ form.clmcObj.cailmc9 }}</td>
              <td>{{ form.clmcObj.cailmc10 }}</td>
            </tr>
            <tr>
              <td width="15%" colspan="2">掺配比例(%)</td>
              <td class="td1">{{ form.cpblObj.chanpb1 }}</td>
              <td class="td1">{{ form.cpblObj.chanpb2 }}</td>
              <td class="td1">{{ form.cpblObj.chanpb3 }}</td>
              <td class="td1">{{ form.cpblObj.chanpb4 }}</td>
              <td class="td1">{{ form.cpblObj.chanpb5 }}</td>
              <td class="td1">{{ form.cpblObj.chanpb6 }}</td>
              <td class="td1">{{ form.cpblObj.chanpb7 }}</td>
              <td class="td1">{{ form.cpblObj.chanpb8 }}</td>
              <td class="td1">{{ form.cpblObj.chanpb9 }}</td>
              <td class="td1">{{ form.cpblObj.chanpb10 }}</td>
            </tr>
            <tr>
              <td rowspan="5">颗粒级配</td>
              <td>筛孔尺寸(mm)</td>
              <td class="td1" v-for="(item, index) in form.skccList">
                <div>{{ item || "-" }}</div>
              </td>
            </tr>
            <tr>
              <td>累计筛余率(%)</td>
              <td class="td1" v-for="(item, index) in form.ljsyList">
                <div>{{ item || "-" }}</div>
              </td>
            </tr>
            <tr>
              <td>通过百分率(%)</td>
              <td class="td1" v-for="(item, index) in form.tgbflList">
                <div>{{ item || "-" }}</div>
              </td>
            </tr>
            <tr>
              <td>规定值(%)</td>
              <td class="td1" v-for="(item, index) in form.gdzList">
                <div>{{ item || "-" }}</div>
              </td>
            </tr>
            <tr>
              <td>结论</td>
              <td colspan="10">
                <el-input type="textarea" :rows="1" v-model="form.jiel" />
              </td>
            </tr>
            <tr>
              <td colspan="12" width="100%" height="100px" class="echarts-border">
                <table-line-log-more-chart :className="'echarts-border'" :chartData="chartData" :yMin="0" :yMax="100" :xType="'category'"></table-line-log-more-chart>
              </td>
            </tr>
          </tbody>
        </table>
        <!-- .................................33333333333333333............................................... -->
        <table height="120px" class="bottom-table">
          <tr>
            <td style="border-bottom-width: 1px">
              <span v-if="isPdf" class="textarea-span">{{ form.jiancjl }}</span>
              <el-input v-else type="textarea" :rows="2" v-model="form.jiancjl" @focus="handleFocus('jiancjl')" @dblclick.native="getJcjl()" />
            </td>
          </tr>
          <tr>
            <td>
              <span v-if="isPdf" class="textarea-span">{{ form.fujsm }}</span>
              <el-input v-else type="textarea" :rows="2" v-model="form.fujsm" @focus="handleFocus('fujsm')" />
            </td>
          </tr>
        </table>
      </div>
      <!-- .................................44444444444............................................. -->
      <table height="22px" class="transparent">
        <tbody>
          <tr>
            <td width="10%" align="right">检测：</td>
            <td width="15%" align="left">
              <!-- {{this.form.jiancr}} -->
            </td>
            <td width="10%" align="right">记录：</td>
            <td width="15%" align="left">
              <!-- {{this.form.jilr}} -->
            </td>
            <td width="10%" align="right">批准:</td>
            <td align="left" width="15%">
              <!-- {{this.form.fuhr}} -->
            </td>
            <td width="10%">日期：</td>
            <td align="left" width="15%">
              <div style="display: inline-block; margin-right: 30px">年</div>
              <div style="display: inline-block; margin-right: 30px">月</div>
              <div style="display: inline-block">日</div>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
    <bs-instrument-view ref="bsInstrumentViewRef" @select="selectInstrument"></bs-instrument-view>
    <bs-jiancyj-view ref="bsJiancyjViewRef" @select="selectJiancyj" :syType="syType"></bs-jiancyj-view>
    <bs-judge-base-view ref="bsJudgeBaseViewRef" @select="selectJudge" :syType="syType"></bs-judge-base-view>
    <bs-judge-base-edit-view ref="bsJudgeBaseEditViewRef" @submit="selectJudgeBaseEdit" :syType="syType"></bs-judge-base-edit-view>
  </div>
</template>

<script>
import { handleFocus, emptyConvert, uniqueStr } from "@/views/reportForms/utils";
import { getCjlkzhhlbgBsInfo } from "@/api/report_jl/cjl";
import { computeBiQualification } from "@/api/sycs/biQualification";
import BsInstrumentView from "@/views/dept/bsInstrument/BsInstrumentView";
import BsJiancyjView from "@/views/sycs/bsJiancyj/BsJiancyjView";
import BsJudgeBaseView from "@/views/sycs/bsJudgeBase/BsJudgeBaseView.vue";
import BsJudgeBaseEditView from "@/views/sycs/bsJudgeBase/BsJudgeBaseEditView.vue";
import TableLineLogMoreChart from "@/views/reportForms/components/TableLineLogMoreChart.vue";

import Bus from "@/utils/bus";
import { orderBy } from "lodash";
// 路面用
export default {
  name: "cjllmysybgTable",
  components: {
    BsInstrumentView,
    BsJiancyjView,
    BsJudgeBaseView,
    BsJudgeBaseEditView,
    TableLineLogMoreChart
  },
  props: {
    excelId: {
      type: [String, Number],
      default: () => ""
    },
    syType: {
      type: [String, Number],
      default: () => ""
    },
    obtainForm: {
      type: [Object],
      default: () => {}
    },
    page: {
      type: Number,
      default: () => 0
    },
    isPdf: {
      type: Boolean,
      default: () => false
    },
    printEmpty: {
      type: Boolean,
      default: () => false
    }
  },
  data() {
    return {
      form: {
        detailList: [],
        baobbhList: [],
        baDetailVos: {}
      },
      show: false,
      chartData: {
        xName: "筛孔尺寸（mm）",
        yName: "累计筛余率（%）",
        seriesData: [],
        time: ""
      },
      lj1List: [],
      lj2List: [],
      lj3List: [],
      lj4List: [],
      lj5List: [],
      lj6List: [],
      lj7List: [],
      lj8List: [],
      lj9List: [],
      lj10List: []
    };
  },
  watch: {
    isPdf(newVal, oldVal) {
      this.form = { ...emptyConvert(this.form, newVal) };
    }
  },
  created() {
    this.init();
  },
  mounted() {
    // 检测依据
    Bus.$on("setCjlBgJiancyj", (data) => {
      const { jiancyj, jiancyjIds } = data;
      const str = jiancyj + (this.form.jiancyj ? "、" + this.form.jiancyj : "");
      const ids = jiancyjIds + (this.form.jiancyjIds ? "," + this.form.jiancyjIds : "");
      this.form.jiancyj = uniqueStr(str, "、");
      this.form.jiancyjIds = uniqueStr(ids, ",");
    });
    // 主要设备
    Bus.$on("setCjlBgZhuyyqsbmcjbh", (data) => {
      const { zhuyyqsbmcjbh, shebIds } = data;
      const str = zhuyyqsbmcjbh + (this.form.zhuyyqsbmcjbh ? "、" + this.form.zhuyyqsbmcjbh : "");
      const ids = shebIds + (this.form.shebIds ? "," + this.form.shebIds : "");
      this.form.zhuyyqsbmcjbh = uniqueStr(str, "、");
      this.form.shebIds = uniqueStr(ids, ",");
    });
    // 各报表给报告传值
    Bus.$on("setCjlBgJiancjg", (data) => {
      if (data.length <= 0) {
        return;
      }
      let count = 0;
      data.forEach((item) => {
        if (!this.form.baDetailVos[item.key] || !this.form.baDetailVos[item.key].qualId) {
          return;
        }
        if (this.form.baDetailVos[item.key].jiancjg == item.value) {
          count++;
        }
      });

      if (count == data.length) {
        return;
      }
      let keys = [];
      let flg = false;
      data.forEach((item) => {
        if (!this.form.baDetailVos[item.key] || !this.form.baDetailVos[item.key].qualId) {
          return;
        }
        this.form.baDetailVos[item.key].jiancjg = item.value;
        if (!flg && this.form.baDetailVos[item.key].symbolValue) {
          flg = true;
        } else {
          this.form.baDetailVos[item.key].jiegpd = "实测值";
        }
        keys.push(item.key);
      });
      if (flg) {
        this.computeDetectionResult(keys);
      }
    });
    // 筛孔尺寸赋值
    Bus.$on("setCjlKzBgData", (data) => {
      if (data) {
        this.handleArr();
        for (let i = 1; i <= 10; i++) {
          if (data.clmcObj["cailmc" + i]) {
            this.form.clmcObj["cailmc" + i] = data.clmcObj["cailmc" + i];
          }
        }
        for (let i = 1; i <= 10; i++) {
          if (data.cpblObj["chanpb" + i]) {
            this.form.cpblObj["chanpb" + i] = data.cpblObj["chanpb" + i];
          }
        }
        for (let i = 0; i < data.skccList.length; i++) {
          this.form.skccList.splice(i, 1, data.skccList[i]);
        }
        for (let i = 0; i < data.ljsyList.length; i++) {
          this.form.ljsyList.splice(i, 1, data.ljsyList[i]);
        }
        for (let i = 0; i < data.tgbflList.length; i++) {
          this.form.tgbflList.splice(i, 1, data.tgbflList[i]);
        }
        for (let i = 0; i < data.gdzList.length; i++) {
          this.form.gdzList.splice(i, 1, data.gdzList[i]);
        }

        this.lj1List = data.lj1List;
        this.lj2List = data.lj2List;
        this.lj3List = data.lj3List;
        this.lj4List = data.lj4List;
        this.lj5List = data.lj5List;
        this.lj6List = data.lj6List;
        this.lj7List = data.lj7List;
        this.lj8List = data.lj8List;
        this.lj9List = data.lj9List;
        this.lj10List = data.lj10List;

        this.$nextTick(() => {
          this.setEcharts();
        });
      }
    });
  },
  beforeDestroy() {
    // 停止监听事件
    Bus.$off("setCjlKzBgData");
    Bus.$off("setCjlBgJiancyj");
    Bus.$off("setCjlBgZhuyyqsbmcjbh");
    Bus.$off("setCjlBgJiancjg");
  },

  methods: {
    // 根据报表id获取当前报表信息
    init() {
      this.show = false;
      getCjlkzhhlbgBsInfo(this.excelId || this.$defaultExcelId).then((response) => {
        this.form = response.data;
        if (!this.form.jiancjl) {
          this.form.jiancjl = "检测结论：";
        }
        if (!this.form.fujsm) {
          this.form.fujsm = "附加声明：";
        }
        this.setInitialValue();
        this.show = true;
        this.$nextTick(() => {
          this.setEcharts();
        });
      });
    },
    handleArr() {
      // 材料名称
      if (!this.form.clmcObj) {
        this.form.clmcObj = {
          cailmc1: null,
          cailmc2: null,
          cailmc3: null,
          cailmc4: null,
          cailmc5: null,
          cailmc6: null,
          cailmc7: null,
          cailmc8: null,
          cailmc9: null,
          cailmc10: null
        };
      }
      // 掺配比例
      if (!this.form.cpblObj) {
        this.form.cpblObj = {
          chanpb1: null,
          chanpb2: null,
          chanpb3: null,
          chanpb4: null,
          chanpb5: null,
          chanpb6: null,
          chanpb7: null,
          chanpb8: null,
          chanpb9: null,
          chanpb10: null
        };
      }
      // 筛孔尺寸
      if (!this.form.skccList || this.form.skccList.length <= 0) {
        this.form.skccList = [null, null, null, null, null, null, null, null, null, null];
      }
      // 累计筛余率
      if (!this.form.ljsyList || this.form.ljsyList.length <= 0) {
        this.form.ljsyList = [null, null, null, null, null, null, null, null, null, null];
      }
      // 通过百分率
      if (!this.form.tgbflList || this.form.tgbflList.length <= 0) {
        this.form.tgbflList = [null, null, null, null, null, null, null, null, null, null];
      }
      // 规定值
      if (!this.form.gdzList || this.form.gdzList.length <= 0) {
        this.form.gdzList = [null, null, null, null, null, null, null, null, null, null];
      }
    },
    // 设置初始值
    setInitialValue() {
      if (this.form) {
        this.form.baobmc = this.form.baobmc || "矿质混合料配合组成试验检测报告";
        this.form.baobbh = this.form.baobbh || "BGLQ02001F";
        this.$set(this.form, "baobbhList", []);
        this.form.baobbhList = ["BGLQ02001F"];
        this.handleArr();
      }
    },
    // 显示仪器列表
    showBsInstrumentView() {
      this.$refs.bsInstrumentViewRef.init(this.form.shebIds);
    },
    // 仪器选择
    selectInstrument(info) {
      this.form.zhuyyqsbmcjbh = info.label;
      this.form.shebIds = info.ids;
    },
    // 显示检测依据列表
    showBsJiancyjView() {
      this.$refs.bsJiancyjViewRef.init(this.form.jiancyjIds);
    },
    // 检测依据选择
    selectJiancyj(info) {
      this.form.jiancyj = info.label;
      this.form.jiancyjIds = info.ids;
    },
    // 显示判定依据列表
    showBsJudgeBaseView() {
      this.$refs.bsJudgeBaseViewRef.init(this.form.pandyjIds);
    },

    // 判断依据选择
    selectJudge(info) {
      if (!info || !info.label) {
        return;
      }
      if (!this.form.pandyj) {
        this.form.pandyj = info.label;
      } else {
        if (info && info.label) {
          this.form.pandyj += "、" + info.label;
        }
      }
      // 添加指标 info.list
      let keys = [];
      info.list.forEach((item) => {
        if (this.form.baDetailVos[item.refQualId] && this.form.baDetailVos[item.refQualId].jiancjg) {
          this.form.baDetailVos[item.refQualId].symbolValue = item.symbolValue;
          this.form.baDetailVos[item.refQualId].num1 = item.num1;
          this.form.baDetailVos[item.refQualId].num2 = item.num2;
          keys.push(item.refQualId);
        }
      });
      this.computeDetectionResult(keys);
    },
    // 显示单个技术编辑
    showBsJudgeBaseEditView(key) {
      const info = this.form.baDetailVos[key];
      info.refQualId = info.qualId;
      this.$refs.bsJudgeBaseEditViewRef.init(info);
    },
    // 编辑单个技术指标后赋值
    selectJudgeBaseEdit(info) {
      if (info.qualId) {
        this.form.baDetailVos[info.qualId] = info;
      }
      this.computeDetectionResult([info.qualId]);
    },
    // 计算检测结果
    computeDetectionResult(keys) {
      if (!keys || keys.length <= 0) {
        return;
      }
      const data = keys.map((key) => {
        const info = {
          ...this.form.baDetailVos[key],
          jiancjg: this.form.baDetailVos[key].jiancjg == "-" ? "" : this.form.baDetailVos[key].jiancjg
        };
        return info;
      });
      computeBiQualification(data).then((res) => {
        const returnData = res.data;
        returnData.forEach((item) => {
          if (!item.symbolValue && !item.num1 && !item.num2) {
            item.jiszb = "-";
          }
          item.jiancjg = item.jiancjg ? item.jiancjg : "-";
          this.form.baDetailVos[item.qualId] = item;
        });
      });
    },
    // 绘制图表
    setEcharts() {
      if (!this.form.skccList || this.form.skccList.length <= 0) {
        return;
      }
      const detailList = this.setCharData();
      let data1 = [];
      let data2 = [];
      let data3 = [];
      let data4 = [];
      let data5 = [];
      let data6 = [];
      let data7 = [];
      let data8 = [];
      let data9 = [];
      let data10 = [];
      let data11 = [];
      let list = [];
      detailList.forEach((item) => {
        if (item.skcc) {
          list.push({
            skcc: Number(item.skcc),
            ljsyl: Number(item.ljsyl),
            l1: Number(item.l1),
            l2: Number(item.l2),
            l3: Number(item.l3),
            l4: Number(item.l4),
            l5: Number(item.l5),
            l6: Number(item.l6),
            l7: Number(item.l7),
            l8: Number(item.l8),
            l9: Number(item.l9),
            l10: Number(item.l10)
          });
        }
      });
      const array = orderBy(list, ["skcc", "age"]);
      array.forEach((item) => {
        data1.push([item.skcc, item.ljsyl]);
        data2.push([item.skcc, item.l1]);
        data3.push([item.skcc, item.l2]);
        data4.push([item.skcc, item.l3]);
        data5.push([item.skcc, item.l4]);
        data6.push([item.skcc, item.l5]);
        data7.push([item.skcc, item.l6]);
        data8.push([item.skcc, item.l7]);
        data9.push([item.skcc, item.l8]);
        data10.push([item.skcc, item.l9]);
        data11.push([item.skcc, item.l10]);
      });

      const c1 = {
        data: data1,
        connectNulls: true,
        smooth: false,
        type: "line"
        // lineStyle: {
        //   type: "dotted"
        // }
      };
      const c2 = {
        data: data2,
        connectNulls: true,
        smooth: false,
        type: "line",
        lineStyle: {
          type: "dotted"
        }
      };
      const c3 = {
        data: data3,
        connectNulls: true,
        smooth: false,
        type: "line",
        lineStyle: {
          type: "dotted"
        }
      };
      const c4 = {
        data: data4,
        connectNulls: true,
        smooth: false,
        type: "line",
        lineStyle: {
          type: "dotted"
        }
      };
      const c5 = {
        data: data5,
        connectNulls: true,
        smooth: false,
        type: "line",
        lineStyle: {
          type: "dotted"
        }
      };
      const c6 = {
        data: data6,
        connectNulls: true,
        smooth: false,
        type: "line",
        lineStyle: {
          type: "dotted"
        }
      };
      const c7 = {
        data: data7,
        connectNulls: true,
        smooth: false,
        type: "line",
        lineStyle: {
          type: "dotted"
        }
      };
      const c8 = {
        data: data8,
        connectNulls: true,
        smooth: false,
        type: "line",
        lineStyle: {
          type: "dotted"
        }
      };
      const c9 = {
        data: data9,
        connectNulls: true,
        smooth: false,
        type: "line",
        lineStyle: {
          type: "dotted"
        }
      };
      const c10 = {
        data: data10,
        connectNulls: true,
        smooth: false,
        type: "line",
        lineStyle: {
          type: "dotted"
        }
      };
      const c11 = {
        data: data11,
        connectNulls: true,
        smooth: false,
        type: "line",
        lineStyle: {
          type: "dotted"
        }
      };
      this.chartData.seriesData = [c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11];
      // this.chartData.seriesData = [chart1, chart2, chart3];
      // this.chartData.seriesData = [chart3, chart4, chart5, chart6, chart7, chart8, chart9, chart10, chart11, chart12, chart13];
      this.chartData.time = new Date().getTime();
    },
    setCharData() {
      const detailList = [];
      for (let i = 0; i < 10; i++) {
        detailList.push({
          skcc: this.form.skccList[i], //筛孔尺寸
          ljsyl: this.form.ljsyList[i], //累计筛余率
          tgbfl: this.form.tgbflList[i], //通过百分率
          l1: this.lj1List[i], //记录表第1列
          l2: this.lj2List[i], //记录表第2列
          l3: this.lj3List[i], //记录表第3列
          l4: this.lj4List[i], //记录表第4列
          l5: this.lj5List[i], //记录表第5列
          l6: this.lj6List[i], //记录表第6列
          l7: this.lj7List[i], //记录表第7列
          l8: this.lj8List[i], //记录表第8列
          l9: this.lj9List[i], //记录表第9列
          l10: this.lj10List[i] //记录表第10列
        });
      }
      return detailList;
    },
    getJcjl() {
      let jcjl = "检测结论：" + "依据《公路工程集料试验规程》JTG E42-2005，" + "检测指标符合《公路桥涵施工技术规范》JTG/T 3650-2020中粗集料Ⅱ类及设计文件的要求，可以用于桥涵工程。";
      this.form.jiancjl = jcjl;
    },
    submitForm() {
      return this.form;
    },
    handleFocus(event) {
      handleFocus(event, this.page, this.form[event]);
    }
  }
};
</script>

<style scoped lang="scss">
//@import url('~@/views/reportForms/style/reportForm.scss');
.echarts-border {
  width: calc(210mm - 40mm - 8px);
  height: 150px;
  padding: 2px !important;
  background-color: #ffffff !important;
}

.td1 {
  width: calc(85% / 10 * 1);
}
</style>
